package com.yuanfeng.commoms.vo.order;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.yuanfeng.commoms.util.TimeStampUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderCommissionVO {

    /**
     * 订单id
     */
    private String orderId;

    /**
     * 商品id
     */
    private Integer goodsId;

    /**
     * 商品名称
     */
    private String goodsName;

    /**
     * 商品价格
     */
    private BigDecimal goodsPrice;

    /**
     * 商品数量
     */
    private Integer goodsNum;

    /**
     * 商品图片
     */
    private String goodsImage;

    /**
     * 分类id
     */
    private Integer catId;

    /**
     * 店铺id
     */
    private Integer shopId;

    /**
     * 申请分享人id
     */
    private String shareUserId;

    /**
     * 申请分享人名称
     */
    private String shareUserName;

    /**
     * 申请分享人电话
     */
    private String shareUserMobile;

    /**
     * 申请分享人店铺id
     */
    private Integer shareUserShopId;

    /**
     * 申请分享人商城id
     */
    private Integer shareUserStoreId;

    /**
     * 申请分享人商城名称
     */
    private String shareUserStoreName;

    /**
     * 购买用户id
     */
    private String buyUserId;

    /**
     * 购买用户名称
     */
    private String buyUserName;

    /**
     * 购买用户电话
     */
    private String buyUserMobile;

    /**
     * 购买用户头像
     */
    private String buyUserAvatar;

    /**
     * 购买用户时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date buyUserTime;

    /**
     * 订单状态
     */
    private Integer orderStatus;

    /**
     * 订单价格
     */
    private BigDecimal orderPrice;

    /**
     * 退款价格
     */
    private BigDecimal returnPrice;

    /**
     * 推广佣金比例
     */
    private String tgRate;

    /**
     * 分销佣金比例
     */
    private String fxRate;

    /**
     * 推广佣金
     */
    private BigDecimal tgCommission;

    /**
     * 分享佣金
     */
    private BigDecimal fxCommission;

    /**
     * 退还推广佣金
     */
    private BigDecimal returnTgCommission;

    /**
     * 退还分享佣金
     */
    private BigDecimal returnFxCommission;

    /**
     * 创建时间
     */
    private String createTime;

    /**
     * 支付时间
     */
    private String payTime;

    /**
     * 退还时间
     */
    private String returnTime;

    /**
     * 1会员微客佣金   2员工微客佣金
     */
    private Integer commissionType;

    /**
     * 购买用户是否分享用户下级  1是  2否
     */
    private Integer bindType;

    /**
     * 0未结算  1已结算
     */
    private Integer settleState;

    /**
     * 结算时间
     */
    private String settleTime;

    /**
     * 结算交易id
     */
    private String settleRecordId;

    /**
     * 购物者是否已成为订单所属店铺的微客：0，否；1，是
     */
    private Integer isShopVk;

    /**
     * 分享 1 推广 2
     */
    private Integer fxTg;

    private String bindUserId;//用户的绑定id

    public OrderCommissionVO(String orderId, Integer orderStatus, BigDecimal returnPrice, BigDecimal returnTgCommission, BigDecimal returnFxCommission) {
        this.orderId = orderId;
        this.orderStatus = orderStatus;
        this.returnPrice = returnPrice;
        this.returnTgCommission = returnTgCommission;
        this.returnFxCommission = returnFxCommission;
        this.returnTime = TimeStampUtil.getNowDate();
    }
}
